<template>
    <div>
        我是子组件

        <span>{{msg}}</span>

        <el-button type="primary" @click="sendMsg">点我向父组件发消息</el-button>
    </div>
</template>

<script>
    export default {
        //接受来自父组件的消息
        props:{
            msg:{
                type: String,
                default: ''
            }
        },
        name: "SystemChildren",
        data(){
            return{

            }
        },
        methods:{
            sendMsg(){
                this.$emit('showMes','我是来自子组件的消息');
            }
        }
    }
</script>

<style scoped>

</style>